import request from '@/utils/request.js'
// 评论相关接口

// 获取热门评论,传入参数是对象,解构获取传入参数,params里面是简写
export const getHotComment = ({ id, type, limit, offset, before }) => {
  return request({
    method: 'GET',
    url: '/comment/hot',
    params: { id, type, limit, offset, before }
  })
}

// 获取评论
export const getComment = ({ id, type, pageNo, pageSize, sortType, cursor }) => {
  return request({
    method: 'GET',
    url: '/comment/new',
    params: { id, type, pageNo, pageSize, sortType, cursor }
  })
}

// 楼中楼评论
export const getCommentInComment = ({ parentCommentid, id, type, limit, time }) => {
  return request({
    method: 'GET',
    url: '/comment/floor',
    params: { parentCommentid, id, type, limit, time }
  })
}
